coins = [1, 2, 5]
amount = 11

dp = [float("inf")] * (amount + 1)
dp[0] = 0

for i in range(1, amount + 1):
    for j in coins:
        if (i - j) >= 0 and dp[i - j] != -1:
            dp[i] = min(dp[i], 1 + dp[i - j])

if dp[amount] == float("inf"):
    print(-1)
print(dp[amount])
